|
 |
Need to supercharge your Web site? Got a database
of products, and no way to get them online. You need to harness
the power of CGI programming. Using languages such as Perl, ASP
and PHP, you can create interactive, intelligent sites. This is
part one of the series that appeared in .net magazine. Subscribe now
so you don't any of the upcoming articles! |
 |
|
Debugging Perl
Broken your script? Try some of these tricks to find out what's
wrong
|
|
One
The error logs your server generates may contain some useful information. In Xitami, you'll find them in C:\Xitami\cgierr.log. Open it in a text editor and you should get some idea where the problem lies
|
Two
Your host may give you access to
their logs, too. The dreaded 500 server error almost always
comes from either the file permissions being set wrong or
not uploading your script in ASCII mode. Delete your script
and upload it again.
|
|
|
|
|
Three
Test your script from the command line. Open
an MS-DOS Prompt window type 'CD \Xitami\cgi-bin'. Then
type 'perl -w' followed by the name of your script. You
should see the all the HTML it would normally send to your
browser spew across your screen.
|
Four
The '-w' switch turns warnings on.
Not every warning is bad - if you see lines about 'uninitialized
values', don't worry - they're not fatal. But look for the
line numbers of anything more dire, then go back to the
code and fix them.
|
|
|
|
click here for print version of this story.
|
 |
 |
 |
|